<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<title>K19 Treinamento</title>
</h:head>
<h:body>
	<h1 align="center">Cadastro de Funcionários</h1>

	<h:form prependId="false">
		<h:panelGrid columns="3">
			<h:outputLabel value="Salário:" for="campo-salario" />
			<h:inputText value="#{funcionarioBean.funcionario.salario}" id="campo-salario" required="true">
				<f:convertNumber locale="pt_BR" maxFractionDigits="2" minFractionDigits="2" />
				<f:validateDoubleRange minimum="0.01" />
			</h:inputText>
			<h:message for="campo-salario" />

			<h:outputLabel value="Código: " for="campo-codigo"  />
			<h:inputText value="#{funcionarioBean.funcionario.codigo}" id="campo-codigo" required="true">
				<f:validateLongRange minimum="1"/>
			</h:inputText>
			<h:message for="campo-codigo" />

			<h:outputLabel value="Data (dd/MM/yyyy)" for="campo-data" />
			<h:inputText value="#{funcionarioBean.funcionario.aniversario}" id="campo-data" required="true">
				<f:convertDateTime locale="pt_BR" />
			</h:inputText>
			<h:message for="campo-data" />

			<h:commandButton value="Cadastrar" />
		</h:panelGrid>
	</h:form>

</h:body>
</html>
